<template>
  <div class="container bg-white">
    <blank
      :value="showEmpty"
      :title="empty.title"
      :subtitle="empty.subtitle"
      :message="empty.message"
      :icon="empty.icon"
    />
  </div>
</template>

<script>
import Blank from '../../components/abnor/blank'
export default {
  components: {
    Blank
  },
  data () {
    return {
      showEmpty: true,
      empty: {
        title: '呃…找不相关内容',
        subtitle: '',
        message:
          '我们无法连接至您的请求。如果确定此请求正确，您可以尝试：过会儿再重试。检查您的网络连接是否正常。如果您部署有网络防火墙，请检查是否已被授权访问网络。',
        icon: '/static/icons/blank_authent.png'
      }
    }
  },
  created () {
    let data = this.$route.query
    if (typeof data === 'object' && data) {
      if (data.status) {
        this.empty.icon = '/static/icons/blank_authent.png'
      }
      if (data.statusText) {
        this.empty.title = data.statusText
      }
      if (data.data) {
        if (data.data.name) {
          this.empty.subtitle = data.data.name
        }

        if (data.data.message) {
          this.empty.message = data.data.message
        }
      }
    }
  }
}
</script>
